namespace ClassLibrary
{
	public static class ConvertExtension
	{
		public static ClassLibrary2.Class1 Convert(this ClassLibrary1.Class1 src0)
		{
			dynamic dest0;
			dynamic src1, dest1, src2, dest2, src3, dest3, src4, dest4, src5, dest5, src6, dest6, src7, dest7, src8, dest8, src9, dest9, src10, dest10, src11, dest11, src12, dest12, src13, dest13, src14, dest14, src15, dest15, src16, dest16;

			dest0 = new ClassLibrary2.Class1();
			dest0.Name = src0.Name;
			src1 = src0.compositeType1;
			if (src1 != null)
			{
				dest1 = new ClassLibrary2.CompositeType1();
				if (src1.composite2Collection != null)
				{
					dest1.composite2Collection = new System.Collections.Generic.List<ClassLibrary2.CompositeType2>();
					for (int i1 = 0; i1 < src1.composite2Collection.Count; i1++)
					{
						src2 = src1.composite2Collection[i1];
						dest2 = new ClassLibrary2.CompositeType2();
						if (src2.composite3Collection != null)
						{
							dest2.composite3Collection = new System.Collections.Generic.List<ClassLibrary2.CompositeType3>();
							for (int i2 = 0; i2 < src2.composite3Collection.Count; i2++)
							{
								src3 = src2.composite3Collection[i2];
								dest3 = new ClassLibrary2.CompositeType3();
								dest3.unsignedID = src3.unsignedID;
								if (src3.composite4List != null)
								{
									dest3.composite4List = new System.Collections.Generic.List<ClassLibrary2.CompositeType4>();
									for (int i3 = 0; i3 < src3.composite4List.Count; i3++)
									{
										src4 = src3.composite4List[i3];
										dest4 = new ClassLibrary2.CompositeType4();
										dest4.identifier = src4.identifier;
										dest4.Width = src4.Width;
										src5 = src4.compositeType5;
										if (src5 != null)
										{
											dest5 = new ClassLibrary2.CompositeType5();
											dest5.signedByte = src5.signedByte;
											dest5.isEnabled = src5.isEnabled;
											dest4.compositeType5 = dest5;
										}
										dest3.composite4List.Add(dest4);
									}
								}
								src4 = src3.compositeType5;
								if (src4 != null)
								{
									dest4 = new ClassLibrary2.CompositeType5();
									dest4.signedByte = src4.signedByte;
									dest4.isEnabled = src4.isEnabled;
									dest3.compositeType5 = dest4;
								}
								src4 = src3.struct1;
								if (src4 != null)
								{
									dest4 = new ClassLibrary2.Struct1();
									dest4.category = src4.category;
									dest4.id = src4.id;
									dest3.struct1 = dest4;
								}
								dest3.LastUpdated = src3.LastUpdated;
								dest2.composite3Collection.Add(dest3);
							}
						}
						src3 = src2.compositeType3;
						if (src3 != null)
						{
							dest3 = new ClassLibrary2.CompositeType3();
							dest3.unsignedID = src3.unsignedID;
							if (src3.composite4List != null)
							{
								dest3.composite4List = new System.Collections.Generic.List<ClassLibrary2.CompositeType4>();
								for (int i3 = 0; i3 < src3.composite4List.Count; i3++)
								{
									src4 = src3.composite4List[i3];
									dest4 = new ClassLibrary2.CompositeType4();
									dest4.identifier = src4.identifier;
									dest4.Width = src4.Width;
									src5 = src4.compositeType5;
									if (src5 != null)
									{
										dest5 = new ClassLibrary2.CompositeType5();
										dest5.signedByte = src5.signedByte;
										dest5.isEnabled = src5.isEnabled;
										dest4.compositeType5 = dest5;
									}
									dest3.composite4List.Add(dest4);
								}
							}
							src4 = src3.compositeType5;
							if (src4 != null)
							{
								dest4 = new ClassLibrary2.CompositeType5();
								dest4.signedByte = src4.signedByte;
								dest4.isEnabled = src4.isEnabled;
								dest3.compositeType5 = dest4;
							}
							src4 = src3.struct1;
							if (src4 != null)
							{
								dest4 = new ClassLibrary2.Struct1();
								dest4.category = src4.category;
								dest4.id = src4.id;
								dest3.struct1 = dest4;
							}
							dest3.LastUpdated = src3.LastUpdated;
							dest2.compositeType3 = dest3;
						}
						dest2.URI = src2.URI;
						dest2.Total = src2.Total;
						dest1.composite2Collection.Add(dest2);
					}
				}
				dest1.description = src1.description;
				dest0.compositeType1 = dest1;
			}
			src1 = src0.compositeType2;
			if (src1 != null)
			{
				dest1 = new ClassLibrary2.CompositeType2();
				if (src1.composite3Collection != null)
				{
					dest1.composite3Collection = new System.Collections.Generic.List<ClassLibrary2.CompositeType3>();
					for (int i1 = 0; i1 < src1.composite3Collection.Count; i1++)
					{
						src2 = src1.composite3Collection[i1];
						dest2 = new ClassLibrary2.CompositeType3();
						dest2.unsignedID = src2.unsignedID;
						if (src2.composite4List != null)
						{
							dest2.composite4List = new System.Collections.Generic.List<ClassLibrary2.CompositeType4>();
							for (int i2 = 0; i2 < src2.composite4List.Count; i2++)
							{
								src3 = src2.composite4List[i2];
								dest3 = new ClassLibrary2.CompositeType4();
								dest3.identifier = src3.identifier;
								dest3.Width = src3.Width;
								src4 = src3.compositeType5;
								if (src4 != null)
								{
									dest4 = new ClassLibrary2.CompositeType5();
									dest4.signedByte = src4.signedByte;
									dest4.isEnabled = src4.isEnabled;
									dest3.compositeType5 = dest4;
								}
								dest2.composite4List.Add(dest3);
							}
						}
						src3 = src2.compositeType5;
						if (src3 != null)
						{
							dest3 = new ClassLibrary2.CompositeType5();
							dest3.signedByte = src3.signedByte;
							dest3.isEnabled = src3.isEnabled;
							dest2.compositeType5 = dest3;
						}
						src3 = src2.struct1;
						if (src3 != null)
						{
							dest3 = new ClassLibrary2.Struct1();
							dest3.category = src3.category;
							dest3.id = src3.id;
							dest2.struct1 = dest3;
						}
						dest2.LastUpdated = src2.LastUpdated;
						dest1.composite3Collection.Add(dest2);
					}
				}
				src2 = src1.compositeType3;
				if (src2 != null)
				{
					dest2 = new ClassLibrary2.CompositeType3();
					dest2.unsignedID = src2.unsignedID;
					if (src2.composite4List != null)
					{
						dest2.composite4List = new System.Collections.Generic.List<ClassLibrary2.CompositeType4>();
						for (int i2 = 0; i2 < src2.composite4List.Count; i2++)
						{
							src3 = src2.composite4List[i2];
							dest3 = new ClassLibrary2.CompositeType4();
							dest3.identifier = src3.identifier;
							dest3.Width = src3.Width;
							src4 = src3.compositeType5;
							if (src4 != null)
							{
								dest4 = new ClassLibrary2.CompositeType5();
								dest4.signedByte = src4.signedByte;
								dest4.isEnabled = src4.isEnabled;
								dest3.compositeType5 = dest4;
							}
							dest2.composite4List.Add(dest3);
						}
					}
					src3 = src2.compositeType5;
					if (src3 != null)
					{
						dest3 = new ClassLibrary2.CompositeType5();
						dest3.signedByte = src3.signedByte;
						dest3.isEnabled = src3.isEnabled;
						dest2.compositeType5 = dest3;
					}
					src3 = src2.struct1;
					if (src3 != null)
					{
						dest3 = new ClassLibrary2.Struct1();
						dest3.category = src3.category;
						dest3.id = src3.id;
						dest2.struct1 = dest3;
					}
					dest2.LastUpdated = src2.LastUpdated;
					dest1.compositeType3 = dest2;
				}
				dest1.URI = src1.URI;
				dest1.Total = src1.Total;
				dest0.compositeType2 = dest1;
			}
			return dest0;
		}
		public static ClassLibrary2.CompositeType1 Convert(this ClassLibrary1.CompositeType1 src0)
		{
			dynamic dest0;
			dynamic src1, dest1, src2, dest2, src3, dest3, src4, dest4, src5, dest5, src6, dest6, src7, dest7, src8, dest8, src9, dest9, src10, dest10, src11, dest11, src12, dest12, src13, dest13, src14, dest14, src15, dest15, src16, dest16;

			dest0 = new ClassLibrary2.CompositeType1();
			if (src0.composite2Collection != null)
			{
				dest0.composite2Collection = new System.Collections.Generic.List<ClassLibrary2.CompositeType2>();
				for (int i0 = 0; i0 < src0.composite2Collection.Count; i0++)
				{
					src1 = src0.composite2Collection[i0];
					dest1 = new ClassLibrary2.CompositeType2();
					if (src1.composite3Collection != null)
					{
						dest1.composite3Collection = new System.Collections.Generic.List<ClassLibrary2.CompositeType3>();
						for (int i1 = 0; i1 < src1.composite3Collection.Count; i1++)
						{
							src2 = src1.composite3Collection[i1];
							dest2 = new ClassLibrary2.CompositeType3();
							dest2.unsignedID = src2.unsignedID;
							if (src2.composite4List != null)
							{
								dest2.composite4List = new System.Collections.Generic.List<ClassLibrary2.CompositeType4>();
								for (int i2 = 0; i2 < src2.composite4List.Count; i2++)
								{
									src3 = src2.composite4List[i2];
									dest3 = new ClassLibrary2.CompositeType4();
									dest3.identifier = src3.identifier;
									dest3.Width = src3.Width;
									src4 = src3.compositeType5;
									if (src4 != null)
									{
										dest4 = new ClassLibrary2.CompositeType5();
										dest4.signedByte = src4.signedByte;
										dest4.isEnabled = src4.isEnabled;
										dest3.compositeType5 = dest4;
									}
									dest2.composite4List.Add(dest3);
								}
							}
							src3 = src2.compositeType5;
							if (src3 != null)
							{
								dest3 = new ClassLibrary2.CompositeType5();
								dest3.signedByte = src3.signedByte;
								dest3.isEnabled = src3.isEnabled;
								dest2.compositeType5 = dest3;
							}
							src3 = src2.struct1;
							if (src3 != null)
							{
								dest3 = new ClassLibrary2.Struct1();
								dest3.category = src3.category;
								dest3.id = src3.id;
								dest2.struct1 = dest3;
							}
							dest2.LastUpdated = src2.LastUpdated;
							dest1.composite3Collection.Add(dest2);
						}
					}
					src2 = src1.compositeType3;
					if (src2 != null)
					{
						dest2 = new ClassLibrary2.CompositeType3();
						dest2.unsignedID = src2.unsignedID;
						if (src2.composite4List != null)
						{
							dest2.composite4List = new System.Collections.Generic.List<ClassLibrary2.CompositeType4>();
							for (int i2 = 0; i2 < src2.composite4List.Count; i2++)
							{
								src3 = src2.composite4List[i2];
								dest3 = new ClassLibrary2.CompositeType4();
								dest3.identifier = src3.identifier;
								dest3.Width = src3.Width;
								src4 = src3.compositeType5;
								if (src4 != null)
								{
									dest4 = new ClassLibrary2.CompositeType5();
									dest4.signedByte = src4.signedByte;
									dest4.isEnabled = src4.isEnabled;
									dest3.compositeType5 = dest4;
								}
								dest2.composite4List.Add(dest3);
							}
						}
						src3 = src2.compositeType5;
						if (src3 != null)
						{
							dest3 = new ClassLibrary2.CompositeType5();
							dest3.signedByte = src3.signedByte;
							dest3.isEnabled = src3.isEnabled;
							dest2.compositeType5 = dest3;
						}
						src3 = src2.struct1;
						if (src3 != null)
						{
							dest3 = new ClassLibrary2.Struct1();
							dest3.category = src3.category;
							dest3.id = src3.id;
							dest2.struct1 = dest3;
						}
						dest2.LastUpdated = src2.LastUpdated;
						dest1.compositeType3 = dest2;
					}
					dest1.URI = src1.URI;
					dest1.Total = src1.Total;
					dest0.composite2Collection.Add(dest1);
				}
			}
			dest0.description = src0.description;
			return dest0;
		}
		public static ClassLibrary2.CompositeType2 Convert(this ClassLibrary1.CompositeType2 src0)
		{
			dynamic dest0;
			dynamic src1, dest1, src2, dest2, src3, dest3, src4, dest4, src5, dest5, src6, dest6, src7, dest7, src8, dest8, src9, dest9, src10, dest10, src11, dest11, src12, dest12, src13, dest13, src14, dest14, src15, dest15, src16, dest16;

			dest0 = new ClassLibrary2.CompositeType2();
			if (src0.composite3Collection != null)
			{
				dest0.composite3Collection = new System.Collections.Generic.List<ClassLibrary2.CompositeType3>();
				for (int i0 = 0; i0 < src0.composite3Collection.Count; i0++)
				{
					src1 = src0.composite3Collection[i0];
					dest1 = new ClassLibrary2.CompositeType3();
					dest1.unsignedID = src1.unsignedID;
					if (src1.composite4List != null)
					{
						dest1.composite4List = new System.Collections.Generic.List<ClassLibrary2.CompositeType4>();
						for (int i1 = 0; i1 < src1.composite4List.Count; i1++)
						{
							src2 = src1.composite4List[i1];
							dest2 = new ClassLibrary2.CompositeType4();
							dest2.identifier = src2.identifier;
							dest2.Width = src2.Width;
							src3 = src2.compositeType5;
							if (src3 != null)
							{
								dest3 = new ClassLibrary2.CompositeType5();
								dest3.signedByte = src3.signedByte;
								dest3.isEnabled = src3.isEnabled;
								dest2.compositeType5 = dest3;
							}
							dest1.composite4List.Add(dest2);
						}
					}
					src2 = src1.compositeType5;
					if (src2 != null)
					{
						dest2 = new ClassLibrary2.CompositeType5();
						dest2.signedByte = src2.signedByte;
						dest2.isEnabled = src2.isEnabled;
						dest1.compositeType5 = dest2;
					}
					src2 = src1.struct1;
					if (src2 != null)
					{
						dest2 = new ClassLibrary2.Struct1();
						dest2.category = src2.category;
						dest2.id = src2.id;
						dest1.struct1 = dest2;
					}
					dest1.LastUpdated = src1.LastUpdated;
					dest0.composite3Collection.Add(dest1);
				}
			}
			src1 = src0.compositeType3;
			if (src1 != null)
			{
				dest1 = new ClassLibrary2.CompositeType3();
				dest1.unsignedID = src1.unsignedID;
				if (src1.composite4List != null)
				{
					dest1.composite4List = new System.Collections.Generic.List<ClassLibrary2.CompositeType4>();
					for (int i1 = 0; i1 < src1.composite4List.Count; i1++)
					{
						src2 = src1.composite4List[i1];
						dest2 = new ClassLibrary2.CompositeType4();
						dest2.identifier = src2.identifier;
						dest2.Width = src2.Width;
						src3 = src2.compositeType5;
						if (src3 != null)
						{
							dest3 = new ClassLibrary2.CompositeType5();
							dest3.signedByte = src3.signedByte;
							dest3.isEnabled = src3.isEnabled;
							dest2.compositeType5 = dest3;
						}
						dest1.composite4List.Add(dest2);
					}
				}
				src2 = src1.compositeType5;
				if (src2 != null)
				{
					dest2 = new ClassLibrary2.CompositeType5();
					dest2.signedByte = src2.signedByte;
					dest2.isEnabled = src2.isEnabled;
					dest1.compositeType5 = dest2;
				}
				src2 = src1.struct1;
				if (src2 != null)
				{
					dest2 = new ClassLibrary2.Struct1();
					dest2.category = src2.category;
					dest2.id = src2.id;
					dest1.struct1 = dest2;
				}
				dest1.LastUpdated = src1.LastUpdated;
				dest0.compositeType3 = dest1;
			}
			dest0.URI = src0.URI;
			dest0.Total = src0.Total;
			return dest0;
		}
		public static ClassLibrary2.CompositeType3 Convert(this ClassLibrary1.CompositeType3 src0)
		{
			dynamic dest0;
			dynamic src1, dest1, src2, dest2, src3, dest3, src4, dest4, src5, dest5, src6, dest6, src7, dest7, src8, dest8, src9, dest9, src10, dest10, src11, dest11, src12, dest12, src13, dest13, src14, dest14, src15, dest15, src16, dest16;

			dest0 = new ClassLibrary2.CompositeType3();
			dest0.unsignedID = src0.unsignedID;
			if (src0.composite4List != null)
			{
				dest0.composite4List = new System.Collections.Generic.List<ClassLibrary2.CompositeType4>();
				for (int i0 = 0; i0 < src0.composite4List.Count; i0++)
				{
					src1 = src0.composite4List[i0];
					dest1 = new ClassLibrary2.CompositeType4();
					dest1.identifier = src1.identifier;
					dest1.Width = src1.Width;
					src2 = src1.compositeType5;
					if (src2 != null)
					{
						dest2 = new ClassLibrary2.CompositeType5();
						dest2.signedByte = src2.signedByte;
						dest2.isEnabled = src2.isEnabled;
						dest1.compositeType5 = dest2;
					}
					dest0.composite4List.Add(dest1);
				}
			}
			src1 = src0.compositeType5;
			if (src1 != null)
			{
				dest1 = new ClassLibrary2.CompositeType5();
				dest1.signedByte = src1.signedByte;
				dest1.isEnabled = src1.isEnabled;
				dest0.compositeType5 = dest1;
			}
			src1 = src0.struct1;
			if (src1 != null)
			{
				dest1 = new ClassLibrary2.Struct1();
				dest1.category = src1.category;
				dest1.id = src1.id;
				dest0.struct1 = dest1;
			}
			dest0.LastUpdated = src0.LastUpdated;
			return dest0;
		}
		public static ClassLibrary2.CompositeType4 Convert(this ClassLibrary1.CompositeType4 src0)
		{
			dynamic dest0;
			dynamic src1, dest1, src2, dest2, src3, dest3, src4, dest4, src5, dest5, src6, dest6, src7, dest7, src8, dest8, src9, dest9, src10, dest10, src11, dest11, src12, dest12, src13, dest13, src14, dest14, src15, dest15, src16, dest16;

			dest0 = new ClassLibrary2.CompositeType4();
			dest0.identifier = src0.identifier;
			dest0.Width = src0.Width;
			src1 = src0.compositeType5;
			if (src1 != null)
			{
				dest1 = new ClassLibrary2.CompositeType5();
				dest1.signedByte = src1.signedByte;
				dest1.isEnabled = src1.isEnabled;
				dest0.compositeType5 = dest1;
			}
			return dest0;
		}
		public static ClassLibrary2.CompositeType5 Convert(this ClassLibrary1.CompositeType5 src0)
		{
			dynamic dest0;
			dynamic src1, dest1, src2, dest2, src3, dest3, src4, dest4, src5, dest5, src6, dest6, src7, dest7, src8, dest8, src9, dest9, src10, dest10, src11, dest11, src12, dest12, src13, dest13, src14, dest14, src15, dest15, src16, dest16;

			dest0 = new ClassLibrary2.CompositeType5();
			dest0.signedByte = src0.signedByte;
			dest0.isEnabled = src0.isEnabled;
			return dest0;
		}
		public static ClassLibrary2.FlavorEnum Convert(this ClassLibrary1.FlavorEnum src0)
		{
			dynamic dest0;
			dynamic src1, dest1, src2, dest2, src3, dest3, src4, dest4, src5, dest5, src6, dest6, src7, dest7, src8, dest8, src9, dest9, src10, dest10, src11, dest11, src12, dest12, src13, dest13, src14, dest14, src15, dest15, src16, dest16;

			dest0 = new ClassLibrary2.FlavorEnum();
			return dest0;
		}
		public static ClassLibrary2.KeyStruct Convert(this ClassLibrary1.KeyStruct src0)
		{
			dynamic dest0;
			dynamic src1, dest1, src2, dest2, src3, dest3, src4, dest4, src5, dest5, src6, dest6, src7, dest7, src8, dest8, src9, dest9, src10, dest10, src11, dest11, src12, dest12, src13, dest13, src14, dest14, src15, dest15, src16, dest16;

			dest0 = new ClassLibrary2.KeyStruct();
			dest0.descriptor = src0.descriptor;
			dest0.ID = src0.ID;
			return dest0;
		}
		public static ClassLibrary2.Struct1 Convert(this ClassLibrary1.Struct1 src0)
		{
			dynamic dest0;
			dynamic src1, dest1, src2, dest2, src3, dest3, src4, dest4, src5, dest5, src6, dest6, src7, dest7, src8, dest8, src9, dest9, src10, dest10, src11, dest11, src12, dest12, src13, dest13, src14, dest14, src15, dest15, src16, dest16;

			dest0 = new ClassLibrary2.Struct1();
			dest0.category = src0.category;
			dest0.id = src0.id;
			return dest0;
		}
		public static ClassLibrary2.Person Convert(this ClassLibrary1.Person src0)
		{
			dynamic dest0;
			dynamic src1, dest1, src2, dest2, src3, dest3, src4, dest4, src5, dest5, src6, dest6, src7, dest7, src8, dest8, src9, dest9, src10, dest10, src11, dest11, src12, dest12, src13, dest13, src14, dest14, src15, dest15, src16, dest16;

			dest0 = new ClassLibrary2.Person();
			dest0.FirstName = src0.FirstName;
			dest0.Age = src0.Age;
			return dest0;
		}

	}
}
